<!DOCTYPE html>
<html>
<head>
    <!-- Standard Meta -->
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <!-- Site Properties -->
    <title>丽江新中数影城</title>
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/reset.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/site.css">

    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/container.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/grid.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/header.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/image.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/menu.css">

    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/divider.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/segment.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/form.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/input.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/button.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/list.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/message.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/icon.css">

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js"></script></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/form.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/components/transition.js"></script>
<!--
body {
            background-image: url("/static/img/ycbg1.jpg");
            background-position: center center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-size: cover;
        }
-->
    <style type="text/css"  >
        body {
            background: url('/img/ycbj4.jpg') no-repeat center center fixed;
            /*兼容浏览器版本*/
            -webkit-background-size: cover;
            -o-background-size: cover;
            background-size: cover;

        }
        .image {
            margin-top: -100px;
        }
        .column {
            max-width: 450px;
            top: 150px;
        }
    </style>
    <script>
        $(document)
            .ready(function() {
                $('.ui.form')
                    .form({
                        fields: {
                            email: {
                                identifier  : 'email',
                                rules: [
                                    {
                                        type   : 'empty',
                                        prompt : '请输入您的电子邮箱'
                                    },
                                    {
                                        type   : 'email',
                                        prompt : '请输入有效的电子邮件'
                                    }
                                ]
                            },
                            password: {
                                identifier  : 'password',
                                rules: [
                                    {
                                        type   : 'empty',
                                        prompt : '请输入密码'
                                    },
                                    {
                                        type   : 'length[6]',
                                        prompt : '密码必须至少为6位数'
                                    }
                                ]
                            }
                        }
                    })
                ;
            })
        ;
    </script>
</head>
<body>
<div class="ui middle aligned center aligned grid">

    <div class="column" >
        <h2 class="ui teal image header">
            <div class="content">
                <font color="#ff8c00">注册你的账号</font>
            </div>
        </h2>
        <form class="ui large form" onsubmit="return false;">
            <div class="ui stacked segment">
                <div class="field">
                    <div class="ui left icon input">
                        <i class="user icon"></i>
                        <input type="text"  id="email" name="email" placeholder="邮箱">
                    </div>
                </div>
                <div class="field">
                    <div class="ui left icon input">
                        <i class="lock icon"></i>
                        <input type="password" id="password" name="password" placeholder="密码">
                    </div>
                </div>
                <div class="field">
                    <div class="ui left icon input">
                        <i class="lock icon"></i>
                        <input type="password" name="repassword" placeholder="密码">
                    </div>
                </div>
                <div class="ui fluid large teal submit button" id="registry">
                    注册
                    </div>
            </div>

            <div class="ui error message"></div>
        </form>
        <div class="ui message">
             试一试？ <a href="/loginss">登录 </a>
        </div>
        <p style="color: deepskyblue;">Copyright © 2023 丽江文化旅游学院   </p>
        <p style="color: deepskyblue;">All Rights Reserved & ICP Licensed</p>
        <p style="color: deepskyblue;">onlinefun.fun 滇ICP备:2023002014号 </p>
    </div>
</div>
<script type="text/javascript" charset="UTF-8">
    //注册账号
    $("#registry").on("click",function (){
       $.ajax({
           url:"/user/create",
           type:"POST",
           data:{
               email: $("#email").val(),
               password:$("#password").val()
           },
           resultType:"JSON",
           success:function (result){
               alert(result.message)
           },
           error:function (result){

           }

       });
    });
</script>
</body>
</html>
